package com.cq.hd.member.service.impl;

import com.cq.hd.common.entity.mq.MerchantLoginRecordMsg;
import com.cq.hd.common.utils.BeanUtils;
import com.cq.hd.member.po.TbMerchantLoginRecordPo;
import com.cq.hd.member.mapper.TbMerchantLoginRecordMapper;
import com.cq.hd.member.service.TbMerchantLoginRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商户登录记录表 服务实现类
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-23
 */
@Service
public class TbMerchantLoginRecordServiceImpl extends ServiceImpl<TbMerchantLoginRecordMapper, TbMerchantLoginRecordPo> implements TbMerchantLoginRecordService {

    @Override
    public Boolean saveMerchantLoginRecord(MerchantLoginRecordMsg merchantLoginRecordMsg) {
        TbMerchantLoginRecordPo tbMerchantLoginRecordPo = new TbMerchantLoginRecordPo();
        BeanUtils.copyProperties(merchantLoginRecordMsg, tbMerchantLoginRecordPo);
        return baseMapper.insert(tbMerchantLoginRecordPo) > 0;
    }
}
